package org.galaxyworld.flycode.gui;

import javax.swing.*;
import java.awt.*;

public abstract class AbstractMainPane extends JPanel {

    protected static final int MARGIN = 8;

    protected static final int GAP = 4;

    protected AbstractMainPane(String title) {
        setLayout(new BorderLayout());

        final JLabel titleLabel = new JLabel(String.format("<html><h1>%s</h1></html>", title));
        add(titleLabel, BorderLayout.NORTH);

        final JPanel mainPane = new JPanel();
        add(mainPane, BorderLayout.CENTER);
        setupMainPane(mainPane);
    }

    protected abstract void setupMainPane(JPanel mainPane);

}
